CREATE TABLE [dbo].[tb_RelPermisosRoles]
(
[idpermiso] [int] NOT NULL,
[idRol] [int] NOT NULL
) ON [PRIMARY]
GO
CREATE UNIQUE NONCLUSTERED INDEX [idx_idrol] ON [dbo].[tb_RelPermisosRoles] ([idRol], [idpermiso]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[tb_RelPermisosRoles] WITH NOCHECK ADD CONSTRAINT [FK_tb_PermisosRoles_tb_Permisos] FOREIGN KEY ([idpermiso]) REFERENCES [dbo].[tb_Permisos] ([idPermiso]) NOT FOR REPLICATION
GO
ALTER TABLE [dbo].[tb_RelPermisosRoles] WITH NOCHECK ADD CONSTRAINT [FK_tb_PermisosRoles_tb_Roles] FOREIGN KEY ([idRol]) REFERENCES [dbo].[tb_Roles] ([idRol])
GO
ALTER TABLE [dbo].[tb_RelPermisosRoles] NOCHECK CONSTRAINT [FK_tb_PermisosRoles_tb_Permisos]
GO
